// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
  env: "mupp-5gs2863z7cf6873f"
})

// 云函数入口函数
exports.main = async (event, context) => {
  const wxContext = cloud.getWXContext()
  const db = cloud.database()
  const user = db.collection('user')
  const _ = db.command

  console.log(event);
  let res = await user.where({
    openid:event.in_openid
}).update({
    data:{
      follow:event.follow,
    }
})

  return {
  
  }
}